package cn.mothin.frame.util;

import java.util.ResourceBundle;

public class ResourceBundleHelper {
	private ResourceBundle resourceBundle=ResourceBundle.getBundle("i18n/i18n");
	private ResourceBundleHelper(){
		
	}
	
	public String getText(String key){
		try{
			return resourceBundle.getString(key);
		}catch(Throwable t){
			
		}
		return key;
	}
	
	private static ResourceBundleHelper resourceBundleHelper;
	public static ResourceBundleHelper getInstance(){
		if(resourceBundleHelper==null){
			resourceBundleHelper=new ResourceBundleHelper();
		}
		return resourceBundleHelper;
	}
}
